#ifndef __RECT_OBJECT_H__
#define __RECT_OBJECT_H__

#include "BaseObject.h"

class CRectObject : public CBaseObject
{
public:
	CRectObject(b2World* world);
	~CRectObject();

public:
	virtual void		Initialize();
	virtual void		Draw();
	virtual void		GenB2();

public:
	void SetRect(float ULX, float ULY, float LRX, float LRY);
	void SetRect(core::position2df& pos, float halfWidth, float halfHeight);
	void SetSolid(bool isSolid);	

public:
	core::rect<float>	m_Rect;
	b2PolygonShape*		m_pShape;

private:
	//def
	b2BodyDef			m_BodyDef;
	b2PolygonDef		m_ShapeDef;
	//is solid
	bool				m_bIsSolid;

};

#endif//__RECT_OBJECT_H__